package obj;

/**
 * @author:WIN10
 * @date:2022/1/15
 * @describe:面向对象
 */
public class FaceObject {

    public static void main(String[] args) {
        Animal eat1 = new Dog("旺财");
        Animal eat2 = new Rabbit("彼得兔");
        Animal eat3 = new Cat("Loss");
        MasterPolymorphic master = new MasterPolymorphic();
        master.feed(eat1);
        master.feed(eat2);
        master.feed(eat3);
    }
}
